<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>

        /*a[href^="http"]:empty::before {*/
            /*content: attr(href);*/
        /*}*/

        .sc_table
        {
            table-layout: fixed;
            border-collapse: collapse;
            width:100%;
            line-height: 30px;;
        }

        .sc_table td
        {
            border:1px #d7d7d7 solid;
            text-align: center;
        }


        td:empty::after {
            content: '--';
        }

        a[href^="http"]:empty::before {
            content: attr(href);
        }



    </style>

</head>
<body>

    <h1>td为空时展现  "--" </h1>

    <table class="sc_table"><tr>
    <td>王孟贵</td>
    <td>28</td>
    <td>中国,湖北</td>
    <td></td>
    </tr></table>

</body>
</html>